<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>event.defaultPrevented</title>
	</head>
	<body>
		<a href="http://www.baidu.com">百度</a>

		<script>
			const link = document.querySelector('a')
			link.addEventListener('click', (event) => {
				event.preventDefault()
				console.log('默认行为是否被阻止', event.defaultPrevented) // true
			})
		</script>
	</body>
</html>
